<%@page import="java.util.ArrayList"%>
<%@page import="bean.FmBoardVo"%>
<%@page import="bean.FmBoardDTO"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>

<link rel = 'stylesheet' href='./css/board.css'/>
<script src='./FmBoard/Board.js'></script>

</head>
<body>


	<jsp:useBean id="vo" class="bean.FmBoardVo" scope="page"></jsp:useBean>
	<jsp:setProperty property="*" name="vo"/>
	
	
	
	<%
	FmBoardDTO dto = new FmBoardDTO();
	dto.setVo(vo);
	ArrayList<FmBoardVo> al = dto.selectMain();
	String m="";
	if(session.getAttribute("sessionMid")!=null){
		m = (String)session.getAttribute("sessionMid");
	}
	%>
	
	
	<h1 align = 'center'><a href = "index.jsp?inc=./FmBoard/bList.jsp">나를 찾아줘</a></h1><hr/><p/>
	
	
	<form name='hiddenFrm' method='post'>
		<input type='hidden' name='nowPage' value='<%=vo.getNowPage()%>'/>
		<input type='hidden' name='kindFind' value='<%=vo.getKindFind()%>'/>
		<input type='hidden' name='locateFind' value='<%=vo.getLocateFind()%>'/>
		<input type='hidden' name='genderFind' value='<%=vo.getGenderFind()%>'/>
		<input type='hidden' name='find' value='<%=vo.getFind()%>'/>
		<input type='hidden' name='rno' value='<%=vo.getRno()%>'/>
		<input type='hidden' id='smid' value='<%=m %>'/>
	</form>
	
	
	<div class = 'board_list'>
		<%
			for(int a=0; a<al.size(); a++){
				FmBoardVo v = al.get(a);
				String fini="";
		%>
		
			
		<a href='#' onclick='goView(<%=dto.getNowPage()%>,<%=v.getRno()%> )'><div class='board_list_items'>
			<div class='board_list_pic'>
			<%
			int d = v.getDeep().split("-").length;
			if(d==1){	
				if(v.getPic()!=null){%>
					<img src='./BoardPhoto/sm_<%=v.getPic() %>' align="middle" alt ='사진' width='80px' height='80px' >
					
				<%}else {%>
					
					<img src='./FmBoard/noImg.png' align="middle" alt ='사진' width='80px' height='80px'>
					
				<%} 
				
			}%></div>
				
				
			<div class='board_list_subject'><%out.print(v.getSubject());%></div>
		</div></a>
		
		<%}%>
	</div>
	
	
</body>

<script>bListInit();</script>

</html>